<div ng-controller="audit_dishController">
    <!--<div>-->
    <div style="width: 95%;margin: auto;position: relative;">
        <table class="table table-striped" style="width: 100%">
            <thead>
            <tr>
                <th style="text-align: center">Logo</th>
                <th style="text-align: center">Merchant</th>
                <th style="text-align: center">Dish Name</th>
                <th style="text-align: center">Price</th>
                <th style="text-align: center">Status</th>
                <th></th>
                <th></th>
            </tr>
            </thead>
            <tbody id="dish-list">
            <tr ng-repeat="dish in dishs | orderBy : ['status', 'createDate'] | filter : {status : '!2'}" id="dish-{{dish._id}}">
                <td class="list-td" width="15%"><img style="width:95px"
                                                     src="http://zha-ita113-w7:8089/{{dish.detail.img }}"></td>
                <td class="list-td" width="15%"> {{dish.detail.merchant.mname}}</td>
                <td class="list-td" width="15%"> {{dish.detail.dname}}</td>
                <td class="list-td" width="15%"> {{dish.detail.price}}</td>
                <td class="list-td" width="15%">{{dish.detail.status | convertDishStatus}}</td>
                <td class="list-td" width="12%">
                    <button ng-click="updateStatus(dish, 1)" ng-disabled="{true : false, false: true}[dish.status == 0]" class="btn" ng-class="{true : 'btn-primary', false: ''}[dish.status == 0]">Pass</button>
                </td>
                <td class="list-td" width="12%">
                    <button ng-click="openWarning(dish)" class="btn"  ng-disabled="{true : false, false: true}[dish.status == 0 || dish.status == 1]" ng-class="{true : 'btn-warning', false: ''}[dish.status == 0 || dish.status == 1]">Refuse</button>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <div ng-include="'/client/pages/dishWarning_modal.html'"></div>
    <!--<div class="modal fade bs-example-modal-sm" id="confirmModel"-->
         <!--tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">-->
        <!--<div class="modal-dialog modal-sm">-->
            <!--<div class="modal-content">-->
                <!--<div class="modal-header">Warning</div>-->
                <!--<div class="modal-body">Are you sure to refuse this dish?</div>-->
                <!--<div class="text-right"-->
                     <!--style="padding-right: 15px; padding-bottom: 7px;">-->
                    <!--<button id="confirm" class="btn btn-danger" data-dismiss="modal">-->
                        <!--Yes-->
                    <!--</button>-->
                    <!--&nbsp;&nbsp;&nbsp;-->
                    <!--<button class="btn btn-info" data-dismiss="modal">Cancel</button>-->
                <!--</div>-->
            <!--</div>-->
        <!--</div>-->
    <!--</div>-->
</div>
